Most video applications seek the highest possible perceptual quality for a given set of bit rate constraints. For example, in a low bit rate application such as a videophone system, a video encoder may provide higher quality by eliminating the strong visual artifacts at the regions of interest that are visually more noticeable and therefore more important. On the other hand, in a high bit rate application, visually lossless quality is expected everywhere in the pictures and a video encoder should also achieve transparent quality. One challenge in obtaining transparent visual quality in high bit rate applications is to preserve details, especially at smooth regions where loss of details are more visible than that at the non-smooth regions because of the texture masking property of the human visual system.
Increasing the available bit rate is one of the most straightforward approaches to improving objective and subjective quality. When the bit rate is given, an encoder manipulates its bit allocation module to spend the available bits where the most visual quality improvement can be obtained. In non-real-time applications such as digital video disk (DVD) authoring, the video encoder can facilitate a variable-bit-rate (VBR) design to produce a video with a constant quality on both difficult and easily encoded contents over time. In such applications, the available bits are appropriately distributed over the different video segments to obtain a constant quality. In contrast, a constant-bit-rate (CBR) system assigns the same number of bits to an interval of one or more pictures despite their encoding difficulty and produces visual quality that varies with the video content. For both variable-bit-rate and constant-bit-rate encoding systems, an encoder can allocate bits according to perceptual models within a picture. One characteristic of human perception is texture masking, which explains why human eyes are more sensitive to loss of quality at the smooth regions than in textured regions. This property can be utilized to increase the number of bits allocated to the smooth regions to obtain a higher visual quality.
The quantization process in a video encoder controls the number of encoded bits and the quality. It is common to adjust the quality through adjusting the quantization parameters (QPs). The quantization parameters may include the quantization step size, rounding offset, and scaling matrix. In the International Organization for Standardization/International Electrotechnical Commission (ISO/IEC) Moving Picture Experts Group-4 (MPEG-4) Part 10 Advanced Video Coding (AVC) Standard/International Telecommunication Union, Telecommunication Sector (ITU-T) H.264 Recommendation (hereinafter the “MPEG-4 AVC Standard”), the quantization parameter values can be adjusted on a slice or macroblock (MB) level. The encoder has the flexibility to tune quantization parameters and signal the adjustment to the decoder. The quantization parameter signaling requires an overhead cost.
QP Coding in the MPEG-4 AVC Standard
The syntax in the MPEG-4 AVC Standard allows quantization parameters to be different for each slice and macroblock (MB). The value of a quantization parameter is an integer and is in the range of 0-51. The initial value for each slice can be derived from the syntax element pic_init_qp_minus26. The initial value is modified at the slice layer when a non-zero value of slice_qp_delta is coded, and is modified further when a non-zero value of mb_qp_delta is coded at the macroblock layer.
Mathematically, the initial quantization parameter for the slice is computed as follows:SliceQPY=26+pic_init_qp_minus26+slice_qp_delta,  (1)
At the macroblock layer, the value of QP is derived as follows:QPY=QPY,PREV+mb_qp_delta,  (2)where QPY,PREV is the quantization parameter of the previous macroblock in the decoding order in the current slice.Quantization Parameter Coding in a First Prior Art Approach
In a first prior art approach (as well as a second prior art approach described in further detail herein below), motion partitions larger than 16×16 pixels are implemented. Using the first prior art approach as an example, macroblocks of sizes 64×64, 64×32, 32×64, 32×32, 32×16, and 16×32 are used in addition to the existing MPEG-4 AVC Standard partitioning sizes. Two new syntax elements mb64_delta_qp and mb32_delta_qp are introduced to code the quantization parameters for large blocks.
The first prior art approach permits the luminance quantizer step size to change as follows. If a 64×64 block is partitioned into four separate 32×32 blocks, each 32×32 block can have its own quantization parameter. If a 32×32 block is further partitioned into four 16×16 blocks, each 16×16 block can also have its own quantization parameter. This information is signaled to the decoder using delta_qp syntax. For a 64×64 block, if the mb64_type is not P8×8 (meaning no further partition), mb64_delta_qp is encoded to signal the relative change in luminance quantizer step size with respect to the block on the top-left side of the current block. This block can be of size 64×64, 32×32 or 16×16. The decoded value of mb64_qp_delta is restricted to be in the range [−26, 25]. The mb64_qp_delta value is inferred to be equal to 0 when it is not present for any block (including P_Skip and B_Skip block types). The value of luminance quantization for the current block, QPY, is derived as follows:QPY=(QPY,PREV+mb64_qp_delta+52)%52,  (3)where QPY,PREV is the luminance QP of the previous 64×64 block in the decoding order in the current slice. For the first 64×64 block in the slice, QPY,PREV is set equal to the slice quantization parameter sent in the slice header.
If mb64_type is P8×8 (meaning a 64×64 block is portioned into four 32×32 blocks), then for each 32×32 block, the same process is repeated. That is, if mb32_type is not P8×8 (meaning no further partition), mb32_delta_qp is encoded. Otherwise, delta_qp for each 16×16 macroblock is sent to the decoder as in the MPEG-4 AVC Standard. It should be noted that when delta_qp is signaled at the 64×64 or 32×32 block size, it is applicable to all the blocks in the motion partition.
Quantization Parameter Coding in a Second Prior Art Approach
In the second prior art approach, the large blocks are supported through the concept of a coding unit. In the second prior art approach, a coding unit (CU) is defined as a basic unit which has a square shape. Although it has a similar role to the macroblock and sub-macroblock in the MPEG-4 AVC Standard, the main difference lies in the fact that the coding unit can have various sizes, with no distinction corresponding to its size. All processing except frame-based loop filtering is performed on a coding unit basis, including intra/inter prediction, transform, quantization and entropy coding. Two special terms are defined: the largest coding unit (LCU); and the smallest coding unit (SCU). For convenient implementation, LCU size and SCU size are limited to values which are a power of 2 and which are greater than or equal to 8.
It is assumed that a picture consists of non-overlapped LCUs. Since the coding unit is restricted to be a square shape, the coding unit structure within a LCU can be expressed in a recursive tree representation adapted to the picture. That is, the coding unit is characterized by the largest coding unit size and the hierarchical depth in the largest coding unit that the coding unit belongs to.
Coupled with the coding unit, the second prior art approach introduces a basic unit for the prediction mode: the prediction unit (PU). It should be noted that the prediction unit is defined only for the last-depth coding unit and its size is limited to that of the coding unit. Similar to conventional standards, two different terms are defined to specify the prediction method: the prediction type; and the prediction unit splitting. The prediction type is one of the values among skip, intra or inter, which roughly describe the nature of the prediction method. After that, possible prediction unit splittings are defined according to the prediction type. For a coding unit size of 2N×2N, the prediction unit for intra has two different possible splittings: 2N×2N (i.e., no split); and N×N (i.e., a quarter split). The prediction unit for inter has eight different possible splittings: four symmetric splittings (2N×2N, 2N×N, N×2N, N×N) and four asymmetric splittings (2N×nU, 2N×nD, nL×2N and nR×2N).
In addition to the coding unit and prediction unit definitions, a transform unit (TU) for transform and quantization is defined separately. It should be noted that the size of the transform unit may be larger than that of the prediction unit, which is different from previous video standards, but the transform unit may not exceed the coding unit size. However, the transform unit size is not arbitrary and once a prediction unit structure has been defined for a coding unit, only two transform unit partitions are possible. As a result, the size of the transform unit in the coding unit is determined by the transform_unit_size_flag. If the transform_unit_size_flag is set to 0, the size of the transform unit is the same as that of the coding unit to which the transform unit belongs. Otherwise, the transform unit size is set as N×N or N/2×N/2 according to the prediction unit splitting.
The basic principle for the quantization and de-quantization coefficients for large transforms is the same as that used in the MPEG-4 AVC Standard, i.e., a scalar quantizer with a dead-zone. Exactly the same quantization parameter range and corresponding quantization step have been used in the proposed codec. For each coding unit, the proposal permits the quantization parameter to change. The value of luminance quantization for the current block, QPY, is derived as follows:QPY=SliceQPY+qp_delta,  (4)where SliceQPY is the quantization parameter for the slice, and qp_delta is the difference between the quantization parameter for the current coding unit and the slice. The same quantization parameter is applied to the whole coding unit.Typical QP Coding Process—QP Predictor from a Single QP
Turning to FIG. 1, a conventional quantization parameter encoding process in a video encoder is indicated generally by the reference numeral 100. The method 100 includes a start block 105 that passes control to a function block 110. The function block 110 sets a quantization parameter (QP) for a slice to SliceQPY, stores SliceQPY as the QP predictor, and passes control to a loop limit block 115. The loop limit block 115 begins a loop using a variable i having a range from 1, . . . , number (#) of coding units, and passes control to a function block 120. The function block 120 sets the QP for each coding unit to QPCU, and passes control to a function block 125. The function block 125 encodes delta_QP=QPCU−SliceQPY, and passes control to a function block 130. The function block 130 encodes coding unit i, and passes control to a loop limit block 135. The loop limit block 135 ends the loop over the coding units, and passes control to an end block 199.
Thus, in method 100, a single QP, namely the slice QP (SliceQPY), is used as the predictor for the QP to be encoded. Regarding function block 120, the QP for a coding unit is adjusted based on its content and/or the previous encoding results. For example, a smooth coding unit will lower the QP to improve the perceptual quality. In another example, if the previous coding units use more bits than the assigned ones, then the current coding unit will increase the QP to consume fewer bits than what is originally assigned. The difference between the QP for the current coding unit (QPCU) and the QP predictor, SliceQPY, in this example, is encoded (per function block 125).
Turning to FIG. 2, a conventional quantization parameter decoding process in a video decoder is indicated generally by the reference numeral 200. The method 200 includes a start block 205 that passes control to a function block 210. The function block 210 decodes SliceQPY, stores SliceQPY as the QP predictor, and passes control to a loop limit block 215. The loop limit block 215 begins a loop using a variable i having a range from 1, . . . , number (#) of coding units, and passes control to a function block 220. The function block 220 decodes delta_QP, and passes control to a function block 225. The function block 225 sets the QP for each coding unit to QPCU=SliceQPY+delta_QP, and passes control to a function block 230. The function block 230 decodes coding unit i, and passes control to a loop limit block 235. The loop limit block 235 ends the loop over the coding units, and passes control to an end block 299. Regarding function block 230, the coding unit is reconstructed thereby.